package com.example.springboot.exception;

import lombok.Getter;

/**
 * 功能：自定义异常
 * 作者：陈雷
 * 日期：2024/10/23 14:10
 */

@Getter
public class ServiceException extends RuntimeException{
    private final String code;

    public ServiceException(String code , String msg){
        super(msg);
        this.code = code;
    }

    public ServiceException(String msg){
        super(msg);
        this.code = "500";
    }
}